/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.my.bigsite.modules.sys.service;

import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import org.activiti.engine.IdentityService;
import org.activiti.engine.identity.Group;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.my.bigsite.common.mybatis.MybatisDao;
import com.my.bigsite.modules.sys.dao.MenuDao;
import com.my.bigsite.modules.sys.entity.Menu;


/**
 * 系统管理，安全相关实体的管理类,包括用户、角色、菜单.
 * @author ThinkGem
 * @version 2013-12-05
 */
@Service
public class SystemService  implements MenuDao  {
	
	public static final String HASH_ALGORITHM = "SHA-1";
	public static final int HASH_INTERATIONS = 1024;
	public static final int SALT_SIZE = 8;
	  
	
	@Autowired
	private MybatisDao mybatisDao;  

	//-- User Service --//
	
	/**
	 * 获取用户
	 * @param id
	 * @return
	 */
	public List<Menu> getMenu() {
		return mybatisDao.getList("MenuMapper.findAllList", 0);
	} 
   
	public List<Menu> findByUserId(Menu menu) {
		List<Menu> menuList=mybatisDao.getList("MenuMapper.findAllList",menu);
		return menuList;
	}

	
	/**
	 * 根据id获得其子节点
	 */
	public Menu getMenu(String id) {
		return mybatisDao.get("MenuMapper.get",id);
	}
	
}
